#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;
const int MOD = 998244353;

ll solve(ll n) {
  ll sum = 0;
  for (ll L = 1, R; L <= n; L = R + 1) {
    ll x = n / L;
    R = n / x;
    sum = (sum + x * (R + 1 - L)) % MOD;
  }
  return sum;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ll l, r;
  cin >> l >> r;
  if (l > r) swap(l, r);
  ll ans = (solve(r) - solve(l - 1) + MOD) % MOD;
  cout << ans;
  return 0;
}